package com.itheima.reggie.common;

/**
 * @Author dml
 * Date on 2022/6/8 0008
 */
//ThreadLocal封装工具 用户保存和获取当前用户id

public class BaseContext {
    private static ThreadLocal<Long> threadLocal =new ThreadLocal<>();

    public static void setCurrentId(Long id){
        threadLocal.set(id);
    }
    public static Long getCurrentId(){
        return threadLocal.get();
    }
}
